3.14 \(\int \frac{d+e x+f x^2+g x^3+h x^4+i x^5}{4-5 x^2+x^4} \, dx\)

Optimal. Leaf size=76 \[ -\frac{1}{6} \tanh ^{-1}\left (\frac{x}{2}\right ) (d+4 f+16 h)+\frac{1}{3} \tanh ^{-1}(x) (d+f+h)-\frac{1}{6} \log \left (1-x^2\right ) (e+g+i)+\frac{1}{6} \log \left (4-x^2\right ) (e+4 g+16 i)+h x+\frac{i x^2}{2} \]

[Out]

h*x + (i*x^2)/2 - ((d + 4*f + 16*h)*ArcTanh[x/2])/6 + ((d + f + h)*ArcTanh[x])/3
 - ((e + g + i)*Log[1 - x^2])/6 + ((e + 4*g + 16*i)*Log[4 - x^2])/6

_______________________________________________________________________________________

Rubi [A]  time = 0.364424, antiderivative size = 76, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 8, integrand size = 38, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.21 \[ -\frac{1}{6} \tanh ^{-1}\left (\frac{x}{2}\right ) (d+4 f+16 h)+\frac{1}{3} \tanh ^{-1}(x) (d+f+h)-\frac{1}{6} \log \left (1-x^2\right ) (e+g+i)+\frac{1}{6} \log \left (4-x^2\right ) (e+4 g+16 i)+h x+\frac{i x^2}{2} \]

Antiderivative was successfully verified.

[In]  Int[(d + e*x + f*x^2 + g*x^3 + h*x^4 + i*x^5)/(4 - 5*x^2 + x^4),x]

[Out]

h*x + (i*x^2)/2 - ((d + 4*f + 16*h)*ArcTanh[x/2])/6 + ((d + f + h)*ArcTanh[x])/3
 - ((e + g + i)*Log[1 - x^2])/6 + ((e + 4*g + 16*i)*Log[4 - x^2])/6

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ - \left (\frac{d}{6} + \frac{2 f}{3} + \frac{8 h}{3}\right ) \operatorname{atanh}{\left (\frac{x}{2} \right )} + \left (\frac{d}{3} + \frac{f}{3} + \frac{h}{3}\right ) \operatorname{atanh}{\left (x \right )} - \left (\frac{e}{6} + \frac{g}{6} + \frac{i}{6}\right ) \log{\left (- x^{2} + 1 \right )} + \left (\frac{e}{6} + \frac{2 g}{3} + \frac{8 i}{3}\right ) \log{\left (- x^{2} + 4 \right )} + \int h\, dx + \frac{\int ^{x^{2}} i\, dx}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((i*x**5+h*x**4+g*x**3+f*x**2+e*x+d)/(x**4-5*x**2+4),x)

[Out]

-(d/6 + 2*f/3 + 8*h/3)*atanh(x/2) + (d/3 + f/3 + h/3)*atanh(x) - (e/6 + g/6 + i/
6)*log(-x**2 + 1) + (e/6 + 2*g/3 + 8*i/3)*log(-x**2 + 4) + Integral(h, x) + Inte
gral(i, (x, x**2))/2

_______________________________________________________________________________________

Mathematica [A]  time = 0.134652, size = 98, normalized size = 1.29 \[ \frac{1}{12} \left (-2 \log (1-x) (d+e+f+g+h+i)+\log (2-x) (d+2 e+4 (f+2 g+4 h+8 i))+2 \log (x+1) (d-e+f-g+h-i)-\log (x+2) (d-2 (e-2 f+4 g-8 h+16 i))+12 h x+6 i x^2\right ) \]

Antiderivative was successfully verified.

[In]  Integrate[(d + e*x + f*x^2 + g*x^3 + h*x^4 + i*x^5)/(4 - 5*x^2 + x^4),x]

[Out]

(12*h*x + 6*i*x^2 - 2*(d + e + f + g + h + i)*Log[1 - x] + (d + 2*e + 4*(f + 2*g
 + 4*h + 8*i))*Log[2 - x] + 2*(d - e + f - g + h - i)*Log[1 + x] - (d - 2*(e - 2
*f + 4*g - 8*h + 16*i))*Log[2 + x])/12

_______________________________________________________________________________________

Maple [B]  time = 0.014, size = 179, normalized size = 2.4 \[ hx+{\frac{\ln \left ( 1+x \right ) d}{6}}-{\frac{\ln \left ( 1+x \right ) e}{6}}-{\frac{\ln \left ( -1+x \right ) d}{6}}-{\frac{\ln \left ( -1+x \right ) e}{6}}+{\frac{8\,\ln \left ( x-2 \right ) i}{3}}-{\frac{\ln \left ( 1+x \right ) i}{6}}-{\frac{\ln \left ( -1+x \right ) i}{6}}+{\frac{8\,\ln \left ( 2+x \right ) i}{3}}+{\frac{4\,\ln \left ( x-2 \right ) h}{3}}+{\frac{\ln \left ( 1+x \right ) h}{6}}-{\frac{4\,\ln \left ( 2+x \right ) h}{3}}-{\frac{\ln \left ( -1+x \right ) h}{6}}-{\frac{\ln \left ( 1+x \right ) g}{6}}+{\frac{2\,\ln \left ( x-2 \right ) g}{3}}-{\frac{\ln \left ( -1+x \right ) g}{6}}+{\frac{2\,\ln \left ( 2+x \right ) g}{3}}+{\frac{\ln \left ( x-2 \right ) d}{12}}+{\frac{\ln \left ( x-2 \right ) e}{6}}+{\frac{\ln \left ( 2+x \right ) e}{6}}+{\frac{\ln \left ( x-2 \right ) f}{3}}-{\frac{\ln \left ( 2+x \right ) d}{12}}+{\frac{\ln \left ( 1+x \right ) f}{6}}-{\frac{\ln \left ( -1+x \right ) f}{6}}-{\frac{\ln \left ( 2+x \right ) f}{3}}+{\frac{i{x}^{2}}{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((i*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4),x)

[Out]

h*x+1/6*ln(1+x)*d-1/6*ln(1+x)*e-1/6*ln(-1+x)*d-1/6*ln(-1+x)*e+8/3*ln(x-2)*i-1/6*
ln(1+x)*i-1/6*ln(-1+x)*i+8/3*ln(2+x)*i+4/3*ln(x-2)*h+1/6*ln(1+x)*h-4/3*ln(2+x)*h
-1/6*ln(-1+x)*h-1/6*ln(1+x)*g+2/3*ln(x-2)*g-1/6*ln(-1+x)*g+2/3*ln(2+x)*g+1/12*ln
(x-2)*d+1/6*ln(x-2)*e+1/6*ln(2+x)*e+1/3*ln(x-2)*f-1/12*ln(2+x)*d+1/6*ln(1+x)*f-1
/6*ln(-1+x)*f-1/3*ln(2+x)*f+1/2*i*x^2

_______________________________________________________________________________________

Maxima [A]  time = 0.70752, size = 119, normalized size = 1.57 \[ \frac{1}{2} \, i x^{2} + h x - \frac{1}{12} \,{\left (d - 2 \, e + 4 \, f - 8 \, g + 16 \, h - 32 \, i\right )} \log \left (x + 2\right ) + \frac{1}{6} \,{\left (d - e + f - g + h - i\right )} \log \left (x + 1\right ) - \frac{1}{6} \,{\left (d + e + f + g + h + i\right )} \log \left (x - 1\right ) + \frac{1}{12} \,{\left (d + 2 \, e + 4 \, f + 8 \, g + 16 \, h + 32 \, i\right )} \log \left (x - 2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((i*x^5 + h*x^4 + g*x^3 + f*x^2 + e*x + d)/(x^4 - 5*x^2 + 4),x, algorithm="maxima")

[Out]

1/2*i*x^2 + h*x - 1/12*(d - 2*e + 4*f - 8*g + 16*h - 32*i)*log(x + 2) + 1/6*(d -
 e + f - g + h - i)*log(x + 1) - 1/6*(d + e + f + g + h + i)*log(x - 1) + 1/12*(
d + 2*e + 4*f + 8*g + 16*h + 32*i)*log(x - 2)

_______________________________________________________________________________________

Fricas [A]  time = 6.91263, size = 119, normalized size = 1.57 \[ \frac{1}{2} \, i x^{2} + h x - \frac{1}{12} \,{\left (d - 2 \, e + 4 \, f - 8 \, g + 16 \, h - 32 \, i\right )} \log \left (x + 2\right ) + \frac{1}{6} \,{\left (d - e + f - g + h - i\right )} \log \left (x + 1\right ) - \frac{1}{6} \,{\left (d + e + f + g + h + i\right )} \log \left (x - 1\right ) + \frac{1}{12} \,{\left (d + 2 \, e + 4 \, f + 8 \, g + 16 \, h + 32 \, i\right )} \log \left (x - 2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((i*x^5 + h*x^4 + g*x^3 + f*x^2 + e*x + d)/(x^4 - 5*x^2 + 4),x, algorithm="fricas")

[Out]

1/2*i*x^2 + h*x - 1/12*(d - 2*e + 4*f - 8*g + 16*h - 32*i)*log(x + 2) + 1/6*(d -
 e + f - g + h - i)*log(x + 1) - 1/6*(d + e + f + g + h + i)*log(x - 1) + 1/12*(
d + 2*e + 4*f + 8*g + 16*h + 32*i)*log(x - 2)

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((i*x**5+h*x**4+g*x**3+f*x**2+e*x+d)/(x**4-5*x**2+4),x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.301763, size = 130, normalized size = 1.71 \[ \frac{1}{2} \, i x^{2} + h x - \frac{1}{12} \,{\left (d + 4 \, f - 8 \, g + 16 \, h - 32 \, i - 2 \, e\right )}{\rm ln}\left ({\left | x + 2 \right |}\right ) + \frac{1}{6} \,{\left (d + f - g + h - i - e\right )}{\rm ln}\left ({\left | x + 1 \right |}\right ) - \frac{1}{6} \,{\left (d + f + g + h + i + e\right )}{\rm ln}\left ({\left | x - 1 \right |}\right ) + \frac{1}{12} \,{\left (d + 4 \, f + 8 \, g + 16 \, h + 32 \, i + 2 \, e\right )}{\rm ln}\left ({\left | x - 2 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((i*x^5 + h*x^4 + g*x^3 + f*x^2 + e*x + d)/(x^4 - 5*x^2 + 4),x, algorithm="giac")

[Out]

1/2*i*x^2 + h*x - 1/12*(d + 4*f - 8*g + 16*h - 32*i - 2*e)*ln(abs(x + 2)) + 1/6*
(d + f - g + h - i - e)*ln(abs(x + 1)) - 1/6*(d + f + g + h + i + e)*ln(abs(x -
1)) + 1/12*(d + 4*f + 8*g + 16*h + 32*i + 2*e)*ln(abs(x - 2))